package mysql

import "gorm.io/gorm"

type Doctor struct {
	gorm.Model
	Account  *string `gorm:"type:varchar(30);not null;comment:'工号'"`
	Password string  `gorm:"type:varchar(32);not null;comment:'密码'"`
}

func (d *Doctor) FindDoctorByAccount(db *gorm.DB, account string) error {
	return db.Debug().Where("account=?", account).First(d).Error
}
